package server.console.groups.setting;

import com.alee.extended.panel.GroupPanel;
import com.alee.laf.scroll.WebScrollPane;

import java.awt.*;

/**
 * 免责声明：本模拟器源代码下载自ragezone.com，仅用于技术研究学习，无任何商业行为。
 */
public class SealedConfigGroup extends AbstractConfigGroup {

    SealedConfigGroup(ConfigPanel owner) {
        super(owner, "漩涡装备设置");
    }

    @Override
    public Component getPreview() {

        TitleWebPanel titleWebPanel1 = new TitleWebPanel("基本设置");
        titleWebPanel1.add(new GroupPanel(3, false,
                new ConfigComponent("打开自定义漩涡装备设置功能", ComponentType.复选框, "sealed.custom"),
                new ConfigComponent("最高可解封等级", ComponentType.编辑框, "sealed.maxlevel"),
                new ConfigComponent("经验倍率(可使用公式)", ComponentType.编辑框, "sealed.expRate"),
                new ConfigComponent("成功率(可使用公式)", ComponentType.编辑框, "sealed.succ"),
                new ConfigComponent("解封所需卷轴数(可用公式)", ComponentType.编辑框, "sealed.needscrollnum")
        ).setMargin(5));

        TitleWebPanel titleWebPanel2 = new TitleWebPanel("属性设置    (以下所有选项可使用公式, x代表装备当前解封等级)");
        titleWebPanel2.add(new GroupPanel(false,
                new ConfigComponent("可砸卷次数", ComponentType.编辑框, "sealed.upgradeslot"),
                new ConfigComponent("力量", ComponentType.编辑框, "sealed.str"),
                new ConfigComponent("敏捷", ComponentType.编辑框, "sealed.dex"),
                new ConfigComponent("智力", ComponentType.编辑框, "sealed.int"),
                new ConfigComponent("运气", ComponentType.编辑框, "sealed.luk"),
                new ConfigComponent("防御(物防+魔防)", ComponentType.编辑框, "sealed.pdd"),
                new ConfigComponent("最大HP", ComponentType.编辑框, "sealed.mhp"),
                new ConfigComponent("最大MP", ComponentType.编辑框, "sealed.mmp"),
                new ConfigComponent("物理攻击", ComponentType.编辑框, "sealed.pad"),
                new ConfigComponent("魔法攻击", ComponentType.编辑框, "sealed.mad"),
                new ConfigComponent("命中率", ComponentType.编辑框, "sealed.acc"),
                new ConfigComponent("回避率", ComponentType.编辑框, "sealed.eva"),
                new ConfigComponent("无视怪物防御%", ComponentType.编辑框, "sealed.imdr"),
                new ConfigComponent("BOSS伤害%", ComponentType.编辑框, "sealed.bdr"),
                new ConfigComponent("全属性%", ComponentType.编辑框, "sealed.allstat"),
                new ConfigComponent("突破伤害上限(扩展)", ComponentType.编辑框, "sealed.limitbreak")
        ).setMargin(3));

        return new WebScrollPane(new GroupPanel(5, false, titleWebPanel1, titleWebPanel2)) {
            {
                createVerticalScrollBar();
            }
        };
    }
}
